package com.lanju.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
/**
 * 房屋委托表
 * @author linjp
 * @CrateTime 20181108
 */
@Entity
@Table(name="lj_house_entrust")
public class Entrust implements Serializable{
	private static final long serialVersionUID = 2367346290820717260L;
	
	private String houseId;			//房子id
	private String city;			//城市
	private String area;			//区域
	private String address;			//房子地址
	private String houseName;		//房子名称\小区名称
	private String years;			//房子年份
	private String houseSize;		//房子大小
	private String houseLayout;		//户型
	private String towards;			//朝向
	private String floor;			//楼层
	private String flag;			//房子特色, 近地铁、阳光足等
	private String type;			//房子类型（1-友家、2-整租、3-直租等）
	private String appliances;		//家具、家电
	private String userId;			//委托人id
	private String nickName;		//委托人称呼
	private String phone;			//委托人联系电话
	private String userRemark;		//委托人备注
	private String status;			//委托状态   状态：0:待联系    1:已联系
	private String handerId;		//委托接手人id、管家id
	private String handlerRemark;	//管家备注
	private String price;			//委托价格
	private String creator;	
	private Date createTime;
	private String updator;	
	private Date updateTime;
	private String entrustType;
	private Set<HouseEntrustImg> imgSet=new HashSet<HouseEntrustImg>();
	
	@Id
	@Column(name = "houseId", unique = true, nullable = false)
	public String getHouseId() {
		return houseId;
	}
	public void setHouseId(String houseId) {
		this.houseId = houseId;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getArea() {
		return area;
	}
	public void setArea(String area) {
		this.area = area;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getHouseName() {
		return houseName;
	}	
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public void setHouseName(String houseName) {
		this.houseName = houseName;
	}
	public String getYears() {
		return years;
	}
	public void setYears(String years) {
		this.years = years;
	}
	public String getHouseSize() {
		return houseSize;
	}
	public void setHouseSize(String houseSize) {
		this.houseSize = houseSize;
	}
	public String getHouseLayout() {
		return houseLayout;
	}
	public void setHouseLayout(String houseLayout) {
		this.houseLayout = houseLayout;
	}
	public String getTowards() {
		return towards;
	}
	public void setTowards(String towards) {
		this.towards = towards;
	}
	public String getFloor() {
		return floor;
	}
	public void setFloor(String floor) {
		this.floor = floor;
	}
	public String getFlag() {
		return flag;
	}
	public void setFlag(String flag) {
		this.flag = flag;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getAppliances() {
		return appliances;
	}
	public void setAppliances(String appliances) {
		this.appliances = appliances;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getNickName() {
		return nickName;
	}
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	public String getUserRemark() {
		return userRemark;
	}
	public void setUserRemark(String userRemark) {
		this.userRemark = userRemark;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getHanderId() {
		return handerId;
	}
	public void setHanderId(String handerId) {
		this.handerId = handerId;
	}
	public String getHandlerRemark() {
		return handlerRemark;
	}
	public void setHandlerRemark(String handlerRemark) {
		this.handlerRemark = handlerRemark;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getUpdator() {
		return updator;
	}
	public void setUpdator(String updator) {
		this.updator = updator;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getEntrustType() {
		return entrustType;
	}
	public void setEntrustType(String entrustType) {
		this.entrustType = entrustType;
	}
	@JsonIgnore
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "entrust")
	public Set<HouseEntrustImg> getImgSet() {
		return imgSet;
	}
	public void setImgSet(Set<HouseEntrustImg> imgSet) {
		this.imgSet = imgSet;
	}

}
